11. Exercise: Deploy Estimator

Deploy an Endpoint and Evaluate Predictions

Finally, you are ready to deploy your trained LinearLearner and see how it performs according to various metrics. As you evaluate this model, I want you to think about:

  • Which metrics best define success for this model?
  • Is it important that we catch all cases of fraud?
  • Is it important to prioritize a smooth user experience and never flag valid transactions?

The answers to these questions may vary based on use case!

In the main exercise notebook, you'll see the following instructions for deploying an endpoint and using it to make predictions:

EXERCISE: Deploy the trained model

Deploy your model to create a predictor. We'll use this to make predictions on our test data and evaluate the model.

%%time 
# deploy and create a predictor
linear_predictor = None

Evaluating Your Model

Once your model is deployed, you can see how it performs when applied to the test data. Let's first test our model on just one test point, to see the resulting list.

# test one prediction
test_x_np = test_features.astype('float32')
result = linear_predictor.predict(test_x_np[0])

print(result)

You should proceed with investigating and evaluating the model test results. And next, I will discuss the results I got after deploying.

Shutting Down an Endpoint

As always, after deploying a model and making/saving predictions, you are free to delete your model endpoint and clean up that resource.